package mycoffee.order.utils;

public class CommonUtils {
    public static String convertMoneyToString(double money) {
        String result = "";
        while (money / 1000 >= 1) {
            String value = "000" + (int) (money % 1000);
            result = "," + value.substring(value.length() - 3) + result;
            money = money / 1000;
        }
        result = ""+ ((int) money) + result;
        return result;// + ".0";
    }
}
